home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / SLShAttr.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  7.5 KB  |  233 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLShAttr.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLSHATTR_H
  11. #define SLSHATTR_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef SLSTRREP_H
  18. #include "SLStrRep.h"
  19. #endif
  20.  
  21. #ifndef FWFXMATH_H
  22. #include "FWFxMath.h"
  23. #endif
  24.  
  25. #ifndef SLGCONST_K
  26. #include "SLGConst.k"
  27. #endif
  28.  
  29. #ifndef SLGRDEF_H
  30. #include "SLGrDef.h"
  31. #endif
  32.  
  33. #ifndef SLCOLOR_H
  34. #include "SLColor.h"
  35. #endif
  36.  
  37. #ifndef SLPAT_H
  38. #include "SLPat.h"
  39. #endif
  40.  
  41. #ifndef SLSTRMRW_H
  42. #include "SLStrmRW.h"
  43. #endif
  44.  
  45. //========================================================================================
  46. // Pattern
  47. //========================================================================================
  48.  
  49. class FW_CPrivPatternRep;
  50. class FW_CPrivFontRep;
  51. class FW_CPrivInkRep;
  52. class FW_CPrivStyleRep;
  53.  
  54. typedef FW_CPrivPatternRep* FW_HPattern;
  55. typedef FW_CPrivInkRep* FW_HInk;
  56. typedef FW_CPrivStyleRep* FW_HStyle;
  57. typedef FW_CPrivFontRep* FW_HFont;
  58.  
  59. // Export or Import functions for CFM-68K [sfu]
  60.  
  61. #if defined(FW_ODFLIB_IMPORT)
  62. #pragma import on
  63. #elif defined(FW_ODFLIB)
  64. #pragma export on
  65. #endif
  66.  
  67. FW_EXTERN_C_BEGIN
  68.  
  69. // Creation
  70.  
  71. FW_HPattern            SL_API    FW_PrivPattern_CreateBlack(FW_PlatformError* error);
  72. FW_HPattern            SL_API    FW_PrivPattern_CreateBW(const FW_BitPattern& bits, FW_PlatformError* error);
  73. FW_HPattern            SL_API    FW_PrivPattern_CreateColor(const FW_PixelPattern& pixels, short nbColors, const FW_SColor* colorTable, FW_PlatformError* error);
  74. FW_HPattern            SL_API    FW_PrivPattern_CreateFromPlatformColorPattern(FW_PlatformColorPattern pattern, FW_PlatformError* error);
  75. FW_HPattern            SL_API    FW_PrivPattern_Copy(FW_HPattern pattern, FW_PlatformError* error);
  76.  
  77. // Reference counting
  78.  
  79. void                SL_API    FW_PrivPattern_Acquire(FW_HPattern pattern);
  80. long                SL_API    FW_PrivPattern_GetRefCount(FW_HPattern pattern);
  81. void                SL_API    FW_PrivPattern_Release(FW_HPattern pattern);
  82.  
  83. // Comparison
  84.  
  85. FW_Boolean            SL_API    FW_PrivPattern_IsEqual(FW_HPattern pattern, FW_HPattern pattern2);
  86.  
  87. // Operations
  88.  
  89. FW_PlatformError    SL_API    FW_PrivPattern_Invert(FW_HPattern pattern);
  90. FW_PlatformError    SL_API    FW_PrivPattern_FlipHorizontally(FW_HPattern pattern);
  91. FW_PlatformError    SL_API    FW_PrivPattern_FlipVertically(FW_HPattern pattern);
  92. FW_PlatformError    SL_API    FW_PrivPattern_ShiftUp(FW_HPattern pattern);
  93. FW_PlatformError    SL_API    FW_PrivPattern_ShiftDown(FW_HPattern pattern);
  94. FW_PlatformError    SL_API    FW_PrivPattern_ShiftLeft(FW_HPattern pattern);
  95. FW_PlatformError    SL_API    FW_PrivPattern_ShiftRight(FW_HPattern pattern);
  96.  
  97. // Streaming
  98.  
  99. FW_HPattern            SL_API    FW_PrivPattern_Read(FW_HReadableStream stream, FW_PlatformError* error);
  100. void                SL_API    FW_PrivPattern_Write(FW_HPattern pattern, FW_HWritableStream stream, FW_PlatformError* error);
  101.  
  102. //========================================================================================
  103. // Ink
  104. //========================================================================================
  105.  
  106. // Creation
  107.  
  108. FW_HInk                SL_API    FW_PrivInk_Create(FW_SColor fore, FW_SColor back, FW_TransferModes mode, FW_PlatformError* error);
  109. FW_HInk                SL_API    FW_PrivInk_CreateStandard(FW_EStandardInks std, FW_PlatformError* error);
  110. FW_HInk                SL_API    FW_PrivInk_Copy(FW_HInk ink, FW_PlatformError* error);
  111.  
  112. // Reference counting
  113.  
  114. void                SL_API    FW_PrivInk_Acquire(FW_HInk ink);
  115. long                SL_API    FW_PrivInk_GetRefCount(FW_HInk ink);
  116. void                SL_API    FW_PrivInk_Release(FW_HInk ink);
  117.  
  118. // Attributes
  119.  
  120. FW_SColor            SL_API    FW_PrivInk_GetForeColor(FW_HInk ink);
  121. FW_SColor            SL_API    FW_PrivInk_GetBackColor(FW_HInk ink);
  122. FW_TransferModes    SL_API    FW_PrivInk_GetTransferMode(FW_HInk ink);
  123.  
  124. // Comparison
  125.  
  126. FW_Boolean            SL_API    FW_PrivInk_IsEqual(FW_HInk ink, FW_HInk ink2);
  127.  
  128. // Operations
  129.  
  130. void                SL_API    FW_PrivInk_SetForeColor(FW_HInk ink, FW_SColor color);
  131. void                SL_API    FW_PrivInk_SetBackColor(FW_HInk ink, FW_SColor color);
  132. void                SL_API    FW_PrivInk_SetTransferMode(FW_HInk ink, FW_TransferModes mode);
  133.  
  134. // Streaming
  135.  
  136. FW_HInk                SL_API    FW_PrivInk_Read(FW_HReadableStream hStream, FW_PlatformError* error);
  137. void                SL_API    FW_PrivInk_Write(FW_HInk ink, FW_HWritableStream stream, FW_PlatformError* error);
  138.  
  139. //========================================================================================
  140. // Style
  141. //========================================================================================
  142.  
  143. // Creation
  144.  
  145. FW_HStyle            SL_API    FW_PrivStyle_CreateDash(FW_Fixed penSize, FW_EStyleDash dash, FW_PlatformError* error);
  146. FW_HStyle            SL_API    FW_PrivStyle_CreatePattern(FW_Fixed penSize, FW_HPattern pattern, FW_PlatformError* error);
  147. FW_HStyle            SL_API    FW_PrivStyle_CreateStandard(FW_EStandardStyles std, FW_PlatformError* error);
  148. FW_HStyle            SL_API    FW_PrivStyle_Copy(FW_HStyle style, FW_PlatformError* error);
  149.  
  150. // Reference counting
  151.  
  152. void                SL_API    FW_PrivStyle_Acquire(FW_HStyle style);
  153. long                SL_API    FW_PrivStyle_GetRefCount(FW_HStyle style);
  154. void                SL_API    FW_PrivStyle_Release(FW_HStyle style);
  155.  
  156. // Attributes
  157.  
  158. FW_Fixed            SL_API    FW_PrivStyle_GetPenSize(FW_HStyle style);
  159. FW_HPattern            SL_API    FW_PrivStyle_GetPattern(FW_HStyle style);
  160. FW_HPattern            SL_API    FW_PrivStyle_GetUnSharedPattern(FW_HStyle style);
  161. FW_EStyleDash        SL_API    FW_PrivStyle_GetDashStyle(FW_HStyle style);
  162.  
  163. // Comparison
  164.  
  165. FW_Boolean            SL_API    FW_PrivStyle_IsEqual(FW_HStyle style, FW_HStyle style2);
  166.  
  167. // Operations
  168.  
  169. void                SL_API    FW_PrivStyle_SetPenSize(FW_HStyle style, FW_Fixed penSize);
  170. FW_PlatformError    SL_API    FW_PrivStyle_SetPattern(FW_HStyle style, FW_HPattern pattern);
  171. void                SL_API    FW_PrivStyle_SetDashStyle(FW_HStyle style, FW_EStyleDash dash);
  172.  
  173. // Streaming
  174.  
  175. FW_HStyle            SL_API    FW_PrivStyle_Read(FW_HReadableStream hStream, FW_PlatformError* error);
  176. void                SL_API    FW_PrivStyle_Write(FW_HStyle style, FW_HWritableStream stream, FW_PlatformError* error);
  177.  
  178. //========================================================================================
  179. // Font
  180. //========================================================================================
  181.  
  182. // Creation
  183.  
  184. FW_HFont            SL_API    FW_PrivFont_Create(FW_HString fontName, FW_FontStyle fontStyle, FW_Fixed fontSize, FW_PlatformError* error);
  185. FW_HFont            SL_API    FW_PrivFont_CreateStandard(FW_EStandardFonts std, FW_PlatformError* error);
  186. FW_HFont            SL_API    FW_PrivFont_Copy(FW_HFont font, FW_PlatformError* error);
  187.  
  188. // Reference counting
  189.  
  190. void                SL_API    FW_PrivFont_Acquire(FW_HFont font);
  191. long                SL_API    FW_PrivFont_GetRefCount(FW_HFont font);
  192. void                SL_API    FW_PrivFont_Release(FW_HFont font);
  193.  
  194. // Attributes
  195.  
  196. FW_Fixed            SL_API    FW_PrivFont_GetSize(FW_HFont font);
  197. FW_FontStyle        SL_API    FW_PrivFont_GetStyle(FW_HFont font);
  198. void                SL_API    FW_PrivFont_GetName(FW_HFont font, FW_HString* fontName, FW_PlatformError* error);
  199.  
  200. // Comparison
  201.  
  202. FW_Boolean            SL_API    FW_PrivFont_IsEqual(FW_HFont font, FW_HFont font2);
  203.  
  204. // Operations
  205.  
  206. void                SL_API    FW_PrivFont_SetSize(FW_HFont font, FW_Fixed size);
  207. void                SL_API    FW_PrivFont_SetStyle(FW_HFont font, FW_FontStyle style);
  208. void                SL_API    FW_PrivFont_SetName(FW_HFont font, FW_HString fontName, FW_PlatformError* error);
  209.  
  210. // Streaming
  211.  
  212. FW_HFont            SL_API    FW_PrivFont_Read(FW_HReadableStream hStream, FW_PlatformError* error);
  213. void                SL_API    FW_PrivFont_Write(FW_HFont font, FW_HWritableStream stream, FW_PlatformError* error);
  214.  
  215. // Macintosh-only
  216.  
  217. #ifdef FW_BUILD_MAC
  218. short                SL_API    FW_PrivFont_MacGetFontID(FW_HFont font);
  219. Style                SL_API    FW_PrivFont_MacGetFontStyle(FW_HFont font);
  220. #endif
  221.  
  222. FW_EXTERN_C_END
  223.  
  224. // For CFM-68K [sfu]
  225.  
  226. #if defined(FW_ODFLIB_IMPORT)
  227. #pragma import off
  228. #elif defined(FW_ODFLIB)
  229. #pragma export off
  230. #endif
  231.  
  232. #endif // SLSHATTR_H
  233.